package com.newegg.nlp.arangodb.dao;

import com.newegg.nlp.arangodb.BasicDao;
import com.newegg.nlp.arangodb.model.Review;

public interface ReviewDao extends BasicDao<Review>{

	default Review getOrCreate(String id, int egg, String review) {
		Review r = get(id);
		if(r == null) {
			r = new Review();
			r.setId(id);
			r.setEgg(egg);
			r.setReview(review);
			saveNotExist(r);
		}
		return r;
	};
	
}
